<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>条件渲染 - 多条件先择</title>
    <script src="https://unpkg.com/vue@next"></script>
  </head>
  <body>
    <div style="text-align: center;" id="Application">
      <h1 v-if="mark==100">满分</h1>
      <h1 v-else-if="mark>60">及格</h1>
      <h1 v-else>不及格</h1>
      <br/>
      <button @click="addSorce">+小点分</button>
    </div>
  </body>

  <script>
    const App= {
      data(){
        return {
          mark:59
        }
      },
      methods: {
        addSorce(){
          if(this.mark==100){
            this.mark = 59;
            return;
          }
          this.mark += 10;
          if(this.mark>100){
            this.mark = 100;
          } 
        }
      }
    }
    Vue.createApp(App).mount("#Application")
  </script>

</html>